package cn.jjxx.modules.portal.enums;

import java.util.HashMap;

public enum RoleEnum {

    /**个人用户角色code*/
    PORTAL_INDIVIDUAL("individual", "个人用户", "56511f64a3a94917985076dfabc42bd2", "GRYH"),
    /**企业用户角色code*/
    PORTAL_COMPANY("company", "企业用户", "6a6a34f9fa024cf3af9e9c40f47de474", "QYYH"),
    ;

    private String code;
    private String name;
    private String id;
    private String dictCode;

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getId() {
        return id;
    }

    public String getDictCode() {
        return dictCode;
    }

    RoleEnum(String code, String name, String id, String dictCode) {
        this.code = code;
        this.name = name;
        this.id = id;
        this.dictCode = dictCode;
    }

    public static RoleEnum getValue(String code) {
        for (RoleEnum roleEnum : values()) {
            if (roleEnum.getCode().equals(code)) {
                return roleEnum;
            }
        }
        return null;
    }

}
